package com.orange.wwwapi.controller.creditflow;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.orange.core.pojo.PageReqDto;
import com.orange.core.pojo.R;
import com.orange.core.pojo.entity.credit.CreditFlow;
import com.orange.core.service.credit.CreditFlowService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 积分流水
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/creditFlow")
public class CreditFlowController {

    private final CreditFlowService creditFlowService;

    /**
     * 分页
     */
    @PostMapping("/page")
    public R<Page<CreditFlow>> page(@RequestBody PageReqDto<Void> dto) {
        return R.ok(creditFlowService.page(dto));
    }
}
